<template>
  <div class="item-box">
    <block-header icon="/static/icon/haoyou.png" title="好友" :tags="typeTags"></block-header>
    <friends-list :data="detlFriendData" v-if="detlFriendData.length > 0"></friends-list>
    <span v-else class="tip-null">暂无数据</span>
  </div>
</template>

<script>
  import BlockHeader from '../../components/block-header'
  import FriendsList from '../../components/friends-list'

  export default {
    name: 'friends-block',
    components: {
      BlockHeader,
      FriendsList
    },
    mixins: [],
    props: {
      detlFriendData: {
        type: Array,
        default: []
      },
      friendTypeData: {
        type: Object,
        default: {}
      }
    },
    data() {
      return {
        tags: [
          '常聊天(6)',
          'TA加的(2)',
          '加TA的(8)'
        ]
      }
    },
    computed: {
      typeTags() {
        let cltNum = this.friendTypeData.clt_num || 0
        let tjdNum = this.friendTypeData.tjd_num || 0
        let jtdNum = this.friendTypeData.jtd_num || 0
        return [
          `常聊天(${cltNum})`,
          `TA加的(${tjdNum})`,
          `加TA的(${jtdNum})`
        ]
      }
    },
    methods: {},
    watch: {},
    mounted() {
    },
    created() {
    }
  }
</script>

<style scoped>

</style>
